/*
 * BlackLightning.PluginLib.(attributes)
 * Andy Tidball
 * 
 * Project: Black Lightning Plugin Library
 * Copyright: GNU General Public License
 */

using System;

namespace BlackLightning.PluginLib {
	/// <summary>
	/// An attribute to tag plugin assemblies with that specifies the earliest version of Black Lightning that they are compatible with.
	/// </summary>
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)]
	public class BLVersionAttribute : Attribute {
		// member data
		private string _Version; // the earliest version of Black Lightning that the tagged assembly is compatible with

		/// <summary>
		/// Creates a new BLVersionAttribute.
		/// </summary>
		/// <param name="Version">The earliest version of Black Lightning that the tagged assembly is compatible with.</param>
		public BLVersionAttribute(string Version) {
			_Version = Version;
		}

		/// <summary>
		/// Gets or sets the earliest version of Black Lightning that the tagged assembly is compatible with.
		/// </summary>
		public string Version {
			get {
				return _Version;
			}
			set {
				_Version = value;
			}
		}
	}

	/// <summary>
	/// An attribute to tag a plugin with the name of the author that created it.
	/// </summary>
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)]
	public class AuthorAttribute : Attribute {
		// member data
		private string _Name; // the name of the author of the plugin

		/// <summary>
		/// Creates a new AuthorAttribute.
		/// </summary>
		/// <param name="Name">The name of the author.</param>
		public AuthorAttribute(string Name) {
			_Name = Name;
		}

		/// <summary>
		/// Gets or sets the author's name.
		/// </summary>
		public string Name {
			get {
				return _Name;
			}
			set {
				_Name = value;
			}
		}
	}
	
	/// <summary>
	/// An attribute to tag a plugin with the URL of a related web site.
	/// </summary>
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)]
	public class WebSiteAttribute : Attribute {
		// member data
		private string _URL; // a web site related to the plugin

		/// <summary>
		/// Creates a new WebSiteAttribute.
		/// </summary>
		/// <param name="URL">The URL of a related web site.</param>
		public WebSiteAttribute(string URL) {
			_URL = URL;
		}

		/// <summary>
		/// Gets or sets the URL of the related web site.
		/// </summary>
		public string URL {
			get {
				return _URL;
			}
			set {
				_URL = value;
			}
		}
	}
}